//
//  RNOLMyRedBagRecordCell.m
//  RongNiuOnline
//
//  Created by apple on 2018/4/24.
//  Copyright © 2018年 rongniu. All rights reserved.
//

#import "RNOLMyRedBagRecordCell.h"


@interface RNOLMyRedBagRecordCell ()

@property (nonatomic,strong) UILabel *redBagTypeLabel;
@property (nonatomic,strong) UILabel *amountLabel;

@end

@implementation RNOLMyRedBagRecordCell

- (UILabel *)redBagTypeLabel{
    if (!_redBagTypeLabel) {
        _redBagTypeLabel = [RNOLUnitTool createLabelWithText:@"新手红包 奖励/使用(元)" textColor:kTextColor fontSize:12];
        [self.contentView addSubview: _redBagTypeLabel];
    }
    return _redBagTypeLabel;
}

- (UILabel *)amountLabel{
    if (!_amountLabel) {
        _amountLabel = [RNOLUnitTool createLabelWithText:@"0.00/0.00" textColor:kAppMainColor fontSize:12 textAlignment:NSTextAlignmentRight];
        [self.contentView addSubview: _amountLabel];
    }
    return _amountLabel;
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self setup];
        
    }
    return self;
}

- (void)setup{
    [self.redBagTypeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.left.equalTo(@20);
        make.width.equalTo(@200);
        make.height.equalTo(@30);
    }];
    
    [self.amountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.right.equalTo(self.contentView).offset(-20);
        make.width.equalTo(@80);
        make.height.equalTo(@30);
    }];
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
